<?php
/* echo $this->Form->input('Product.attribute', 
  array('type' => 'select','options'=>$_list_attributes,
  'name'=>'data[Product][Attr][1][attribute]','class'=>'ProductAttribute mws-textinput','empty'=>false,'label' =>false)
  ); */
?>
<?php
if (isset($_list_attributes) and ($_list_attributes)) {
    foreach ($_list_attributes as $_list_attribute) {
        ?>
        <div id="ATTR1337845210377<?php echo $_list_attribute['Attribute']['id']; ?>">
            <div class="mws-form-row">
                <label>Select Attribute:</label>
                <div class="mws-form-item small">
                    <input type="text" class="mws-textinput" value="<?php echo $_list_attribute['Attribute']['name']; ?>" readonly="readonly">
                    <input type="hidden" style="width:100px;" value="<?php echo $_list_attribute['Attribute']['id']; ?>" name="data[Product][Attr][<?php echo $_list_attribute['Attribute']['id']; ?>][attribute]">
                    <input type="hidden" class="sd" value="<?php echo $_list_attribute['Attribute']['name']; ?>"
                           name="data[Product][Attr][<?php echo $_list_attribute['Attribute']['id']; ?>][key]">
                </div>
            </div>
            <div class="mws-form-row">
                <label>Attribute Value:</label>
                <div class="mws-form-item small"> <div class="input text">
        <?php
        if (isset($_list_attribute['Attribute']['required']) and ($_list_attribute['Attribute']['required'] == 1)) {
            $required = 'required="required"';
            $variable = "required";
        } else {
            $required = "";
            $variable = "optional";
        }
        ?>
                        <input type="text" style="width:306px;" id="ProductAttrValue" class="mws-textinput" <?php echo $required; ?> value="" name="data[Product][Attr][<?php echo $_list_attribute['Attribute']['id']; ?>][attr_value]">(<?php echo $variable; ?>)
                    </div> </div>
            </div>
        </div>
        <div class="clear" style="clear:both;"></div>
        <?php
    }
} else {
    echo $message;
}
?>